package com.futureCloudMOM.core.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.futureCloudMOM.core.entity.FBaseEntity;
import com.futureCloudMOM.framework.dict.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "Produce_Report", description = "报工实体表")
@TableName(value = "Produce_Report")
public class ProduceReport extends FBaseEntity implements Serializable {


    
    @NotBlank(message="[报工单号]不能为空")
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("报工单号")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "reportNo")
    private String reportNo;
    
    @NotBlank(message="[任务单号]不能为空")
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("任务单号")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "taskBillNo")
    private String taskBillNo;
    
    @NotNull(message="[工序序号]不能为空")
    @ApiModelProperty("工序序号")
    @TableField(value = "subNo")
    private Long subNo;
    
    @ApiModelProperty("派工单ID")
    @TableField(value = "dispatchID")
    private Long dispatchID;
    
    @ApiModelProperty("计时派工Id")
    @TableField(value = "assignId")
    private Long assignId;
    
    @ApiModelProperty("返工单Id")
    @TableField(value = "reworkId")
    private Long reworkId;
    
    @ApiModelProperty("返工单子项Id")
    @TableField(value = "reworkSubId")
    private Long reworkSubId;
    
    @ApiModelProperty("生产资源Id")
    @TableField(value = "resourceId")
    private Long resourceId;
    
    @NotBlank(message="[合格数量]不能为空")
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("合格数量")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "qty")
    private BigDecimal qty;
    
    @NotBlank(message="[报废数量]不能为空")
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("报废数量")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "scrapQty")
    private BigDecimal scrapQty;

    @NotBlank(message="[不良数量]不能为空")
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("不良数量")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "reworkQty")
    private BigDecimal reworkQty;
    
    @ApiModelProperty("状态")
    @TableField(value = "status")
    private Long status;
    
    @ApiModelProperty("审核人")
    @TableField(value = "checkerId")
    private Long checkerId;
    
    @ApiModelProperty("审核时间")
    @TableField(value = "checkTime")
    private Date checkTime;
    
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("ERP入库单别")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "warehouseInExt")
    private String warehouseInExt;
    
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("ERP入库单号")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "warehouseInNo")
    private String warehouseInNo;
    
    @ApiModelProperty("单位Id")
    @TableField(value = "unitId")
    private Long unitId;
    
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("转换数量")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "conversionQty")
    private BigDecimal conversionQty;
    
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("转换率")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "conversionRate")
    private String conversionRate;
    
    @ApiModelProperty("转换单位")
    @TableField(value = "conversionUnitId")
    private Long conversionUnitId;
    
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("备注")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "remark")
    private String remark;
    
    @ApiModelProperty("报工人员Id")
    @TableField(value = "reportEmpId")
    private Long reportEmpId;
    
    @ApiModelProperty("供应商Id")
    @TableField(value = "reportSupId")
    private Long reportSupId;
    
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("单价")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "priceOne")
    private BigDecimal priceOne;
    
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("金额")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "amount")
    private BigDecimal amount;
    
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("标包数量")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "minPackage")
    private BigDecimal minPackage;
    
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("生产类型")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "routeType")
    @Dict(dictCode = "route_type")
    private Long routeType;
    
    @ApiModelProperty("WMS单据回写")
    @TableField(value = "wmsBillId")
    private Long wmsBillId;
    
    @ApiModelProperty("WMS单据明细回写")
    @TableField(value = "wmsBillEntryId")
    private Long wmsBillEntryId;
    
    @ApiModelProperty("是否入库")
    @TableField(value = "forceStopIn")
    @Dict(dictCode = "storage_status")
    private Long forceStopIn;
    
    @ApiModelProperty("报工标识 人工/机采")
    @TableField(value = "reportFlag")
    private Long reportFlag;
    
    @ApiModelProperty("模穴数量")
    @TableField(value = "moldQty")
    private Long moldQty;
    
    @ApiModelProperty("报工时间")
    @TableField(value = "reportTime")
    private Date reportTime;
    
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("加工时长")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "worktime")
    private String worktime;
    
    @ApiModelProperty("上岗记录ID")
    @TableField(value = "signInID")
    private Long signInID;
    
    @ApiModelProperty("工序ID")
    @TableField(value = "processID")
    private Long processID;

    /**
     * 是否需要审核
     */
    @ApiModelProperty("是否审核")
    @TableField(value = "whetherCheck")
    private Long whetherCheck;






}

